import numpy as np
import cv2

start_frame = 13470

cap = cv2.VideoCapture("E:/Research/2020ContrastiveLearningForSceneLabel/Data/20210329ExperimentData/round2/round2.avi")
cap.set(cv2.CAP_PROP_POS_FRAMES, start_frame)

while(1):
    ret,frame = cap.read()
    if frame is None: break
    frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    frame = cv2.GaussianBlur(frame,(3,3),0)
    canny = cv2.Canny(frame, 20, 150)
    cv2.imshow('Canny', canny)
    k = cv2.waitKey(0)
    if k == 27:
        break